package com.osstem;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class Main extends Activity implements OnClickListener{

	 @Override
	    public void onCreate(Bundle savedInstanceState) {
	        super.onCreate(savedInstanceState);
	        setContentView(R.layout.main);
	        
	        
	        Button insertButton = (Button)findViewById(R.id.insert_menu);
	        insertButton.setOnClickListener(this);
	        
	        Button searchButton = (Button)findViewById(R.id.search_menu);
	        searchButton.setOnClickListener(this);
	        
	        Button locationButton = (Button)findViewById(R.id.location_menu);
	        locationButton.setOnClickListener(this);
	        
	    }

	@Override
	public void onClick(View v) {
		Log.i("realTest", "v.getId() =  " + v.getId() );
		
		if(v.getId() == R.id.insert_menu){
			Intent intent = new Intent( this, ChangeSystemActivity.class);
			startActivity(intent);
		}
		else if (v.getId() == R.id.search_menu){
			Intent intent = new Intent( this, SearchAmount.class);
			startActivity(intent);
		}
		else if (v.getId() == R.id.location_menu){
			Intent intent = new Intent( this, LocationActivity.class);
			startActivity(intent);
		}
	}
}
